<template>
	<view class="item-cont" @click="onClick(item.id)">
		<image class="item-img-bg" :src="item.show_img"></image>
		<view class="item-title">
			<view class="elipsis">{{item.title}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: Object
		},
		data() {
			return {}
		},
		methods: {
			onClick(id) {
				let url = `/pages/market/article/article?id=${id}`
				this.onGoNext(url)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.item-cont{
		width: 100%;
		height: 226rpx;
		border-radius: 10rpx;
		overflow: hidden;
		font-size: 0;
		margin-bottom: 30rpx;
		box-shadow: 6rpx 6rpx 8rpx rgba($text-color-grey, .3);
		position: relative;
		&::after{
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			background-image: linear-gradient(rgba(#000, 0) , rgba(#000, .4));
			z-index: 2;
		}
		.item-img-bg{
			width: 100%;
			height: 100%;
		}
		.item-title{
			position: absolute;
			width: 408rpx;
			padding-left: 20rpx;
			height: 60rpx;
			line-height: 60rpx;
			font-size: 25rpx;
			color: $text-color;
			background-color: rgba($color-primary, .9);
			left: 0;
			bottom: 24rpx;
			z-index: 10;
			&::after{
				content: "";
				position: absolute;
				right: -60rpx;
				bottom: 0;
				width: 0;
				height: 0;
				border-style: solid;
				border-width: 60rpx 0 0 60rpx;
				border-color: transparent transparent transparent rgba($color-primary, .9);
			}
			.elipsis{
				width: 400rpx;
			}
		}
	}
</style>
